package hivi.vn.hivigold.database;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;

public class Preferences {
	public static final String NAMESPACE= "NameSpace";
	public static final String URL= "ServerURL";
	public static final String CURRENTUSER= "CurrentUser";
	public static final String USERNAME= "UserName";
	public static final String PASSWORD= "PassWord";
	public static final String EMPLOYEEID= "EmployeeID";
	public static final String EMPLOYEENAME= "EmployeeName";
	public static final String STOCKID= "StockID";
	public static final String STOCKNAME= "StockName";
	public static final String PARTNERID= "PartnerID";
	public static final String PARTNERNAME= "PartnerName";
	public static final String VOUCHERTYPE= "VoucherType";
	public static final String SALETYPE= "HtBan";
	public static final String SALEACCOUNT= "TkBan";
	public static final String BUYTYPE= "HtMua";
	public static final String BUYACCOUNT= "TkMua";
	public static final String CKACCOUNT= "TkCk";
	public static final String PRINTTYPE= "Printtype";
	public static final String ACCESS= "Access";
	public static String getPreferenceValue(Context c,String key)
	{
		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(c);
		return sp.getString(key, "*");
	}
	public static void editPreferenceValue(Context c,String key,String value)
	{
		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(c);
		Editor edit = sp.edit();
		edit.putString(key, value);
		edit.commit();
	}
}
